package edu.zac.controller;

import edu.zac.pojo.Emp;
import edu.zac.service.EmpService;

import java.io.IOException;

/**
 * @Title
 * @Author Peihan.Zhang
 * @Email zhangpeihan@sjgtw.com
 * @Date 2021/10/18 20:09
 * @Versions 1.0
 */
public class EmpController {
    private Emp emp;
    private EmpService empService;

    public void setEmp(Emp emp) {
        this.emp = emp;
    }

    public void setEmpService(EmpService empService) {
        this.empService = empService;
    }

    public void addEmp() throws IOException {
        try {
            empService.addEmp(this.emp);
        } catch (IOException e) {
            e.printStackTrace();
            System.out.println("controller出问题了");
            throw  e;
        }
    }
}
